package dwz.cms.article.util.ftp;

import java.io.File;

/** 
* Created by Eclipse
* @author : Yating
* @version:2017年4月18日 上午9:31:50 
* 类说明 
*/
public class MyFTPFile {private File file;
private String goalPath;
private String operation;

public String getOperation() {
	return operation;
}

public void setOperation(String operation) {
	this.operation = operation;
}

public File getFile() {
	return file;
}

public void setFile(File file) {
	this.file = file;
}

public String getGoalPath() {
	return goalPath;
}

public void setGoalPath(String goalPath) {
	this.goalPath = goalPath;
}

public MyFTPFile(File file, String goalPath, String operation) {
	super();
	this.file = file;
	this.goalPath = goalPath;
	this.operation = operation;
}

@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((file == null) ? 0 : file.hashCode());
	result = prime * result
			+ ((goalPath == null) ? 0 : goalPath.hashCode());
	result = prime * result
			+ ((operation == null) ? 0 : operation.hashCode());
	return result;
}

@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	final MyFTPFile other = (MyFTPFile) obj;
	if (file == null) {
		if (other.file != null)
			return false;
	} else if (!file.getName().equals(other.file.getName()))
		return false;
	if (goalPath == null) {
		if (other.goalPath != null)
			return false;
	} else if (!goalPath.equals(other.goalPath))
		return false;
	if (operation == null) {
		if (other.operation != null)
			return false;
	} else if (!operation.equals(other.operation))
		return false;
	return true;
}

}

 